#!/usr/bin/python3
# -*- coding: utf-8 -*-

# @Time    : 2018/11/16 18:00
# @Author  : chester7cheng
# @Email   : 346835646@qq.com
# @File    : filter.py 
# @Software: PyCharm


def is_odd(n):
    return n % 2 == 1


print(filter(is_odd, [1, 2, 3, 4, 5, 6, 7, 8, 9, 0]))


def _odd_iter():
    n = 1
    while True:
        n = n + 2
        yield n



